export default {
    watch: {
        show: function (t) {
            t && this.changeStatus(),
                t ||
                    this.setData({
                        status: t
                    });
        }
    },
    methods: {
        changeStatus() {
            this.setData({
                status: !0
            }),
                this.timer && clearTimeout(this.timer),
                (this.timer = setTimeout(() => {
                    this.setData({
                        status: !1
                    }),
                        this.success && this.success(),
                        (this.timer = null);
                }, this.duration));
        }
    }
};
